'use strict';

module.exports = appInfo => {
  const config = exports = {};

  exports.mongoose = {
    url: 'mongodb://127.0.0.1:27017/shopanalysis',
    options: {}
  };

  exports.io = {
    enable: true,
    package: 'egg-socket.io',
  };

  exports.cors = {
    origin: '*',
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH',
  };

  // add your config here
  config.security = {
    csrf: {
      enable: false,
    },
  };
  exports.bodyParser = {
    jsonLimit: '10mb',
    formLimit: '10mb',
  };

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1514171177322_4494';

  // add your config here
  config.middleware = [];

  return config;
};
